<?php
   class newController extends platformController{
	   //新建新闻控制器
	   public function newAction(){
		   require CURRENT_VIEW_PATH."news_new.html";
	   }
	   //新建新闻的方法
	   public function insertAction(){
		   if(empty($_POST)){
			   return false;
		   }
		   $model=new newModel();
		   if($model->insert()){
		       echo "<script>alert('发布新闻成功');history.back();</script>";
		   }else{
		       echo "<script>alert('发布新闻失败');history.back();</script>";
		   }
	   }
   }
?>